﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace XS.Tunnel.Cad.SteelBracing
{

    public static class RoundConstant
    {
        /// <summary>
        /// 初期支护外轮廓
        /// </summary>
        public const string PrimarySupportOuterContour = "primarySupportOuterContour";
        /// <summary>
        /// 初期支护内轮廓
        /// </summary>
        public const string PrimarySupportInnerContour = "primarySupportInnerContour";
        /// <summary>
        /// 二次衬砌外轮廓
        /// </summary>
        public const string SecondaryLiningOuterContour = "secondaryLiningOuterContour";

        #region 暗洞组成部件

        /// <summary>
        /// 右水平线(rightHorizon)
        /// </summary>
        public const string RightHorizon = "rightHorizon";
        /// <summary>
        /// 右拱脚圆弧
        /// </summary>
        public const string RightFootArchArc = "rightFootArchArc";
        /// <summary>
        /// 拱顶圆弧(vaultArc)
        /// </summary>
        public const string VaultArc = "vaultArc";

        /// <summary>
        /// 左拱脚圆弧(leftFootArchArc)
        /// </summary>
        public const string LeftFootArchArc = "leftFootArchArc";

        /// <summary>
        /// 左水平线(leftHorizon)
        /// </summary>
        public const string LeftHorizon = "leftHorizon";

        /// <summary>
        /// 右直线圆弧
        /// </summary>
        public const string RightLineArc = "rightLineArc";

        /// <summary>
        /// 左直线圆弧(leftLineArc)
        /// </summary>
        public const string LeftLineArc = "leftLineArc";

        /// <summary>
        /// 左拱脚圆弧下(leftFootArchArcDown)
        /// </summary>
        public const string LeftFootArchArcDown = "leftFootArchArcDown";

        /// <summary>
        /// 仰拱圆弧(invertedArchArc)
        /// </summary>
        public const string InvertedArchArc = "invertedArchArc";

        /// <summary>
        /// 右拱脚圆弧下(rightFootArchArcDown)
        /// </summary>
        public const string RightFootArchArcDown = "rightFootArchArcDown";

        #endregion


    }

    /// <summary>
    /// 结构坐标位置
    /// </summary>
    public static class StructurePointLocationConstant
    {
        /// <summary>
        /// 初期支护外轮廓
        /// </summary>
        public const string PrimarySupportOuterContour = "primarySupportOuterContour";
        /// <summary>
        /// 初期支护内轮廓
        /// </summary>
        public const string PrimarySupportInnerContour = "primarySupportInnerContour";

        /// <summary>
        /// 二次衬砌外轮廓右辅助线
        /// </summary>
        public const string RightboostVerticalLine = "rightboostVerticalLine";



        /// <summary>
        /// 二次衬砌外轮廓
        /// </summary>
        public const string SecondaryLiningOuterContour = "secondaryLiningOuterContour";
        /// <summary>
        /// 内轮廓--二次衬砌
        /// </summary>
        public const string InnContourData = "InnContourData";

        /// <summary>
        /// 右二次衬砌辅助线
        /// </summary>
        public const string RightSecondaryLiningGuide = "rightSecondaryLiningGuide";

        /// <summary>
        /// 右横线  100
        /// </summary>
        public const string RightHorizon = "rightHorizon";
        /// <summary>
        /// 右直线  200
        /// </summary>
        public const string RightLine = "rightLineArc";

        /// <summary>
        /// 右圆弧-内轮廓  200
        /// </summary>
        public const string RightFootArchArc = "rightFootArchArc";
        /// <summary>
        /// 右边墙 21
        /// </summary>
        public const string RightSidewallArc = "rightSidewallArc";
        /// <summary>
        /// 右拱腰22
        /// </summary>
        public const string RightHanceArc = "rightHanceArc";
        /// <summary>
        /// 右拱肩23
        /// </summary>
        public const string RightSpandrelArc = "rightSpandrelArc";




        /// <summary>
        /// 拱顶  300
        /// </summary>
        public const string Vault = "vaultArc";


        /// <summary>
        /// 左边肩 31
        /// </summary>
        public const string LeftSpandrelArc = "leftSpandrelArc";

        /// <summary>
        /// 左边肩 32
        /// </summary>
        public const string LeftHanceArc = "leftHanceArc";

        /// <summary>
        /// 左边墙  33
        /// </summary>
        public const string LeftSidewallArc = "leftSidewallArc";

        /// <summary>
        /// 左直线   400
        /// </summary>
        public const string LeftLine = "leftLineArc";
        /// <summary>
        /// 左圆弧-内轮廓
        /// </summary>
        public const string LeftArchArc = "leftFootArchArc";
        /// <summary>
        /// 左横线  500
        /// </summary>
        public const string LeftHorizon = "leftHorizon";

        /// <summary>
        /// 左二次衬砌辅助线
        /// </summary>
        public const string LeftSecondaryLiningGuide = "leftSecondaryLiningGuide";

        /// <summary>
        /// 二次衬砌 外轮廓 左竖线
        /// </summary>
        public const string LeftboostVerticalLine = "leftboostVerticalLine";


        /// <summary>
        /// 左仰拱圆弧 600
        /// </summary>
        public const string LeftInvertedArchArc = "leftFootArchArcDown";

        /// <summary>
        /// 仰拱圆弧  700
        /// </summary>
        public const string InvertedArchArc = "invertedArchArc";
        /// <summary>
        /// 右仰拱圆弧 800
        /// </summary>
        public const string RightInvertedArchArc = "rightFootArchArcDown";



    }
    /// <summary>
    /// 圆心类型
    /// </summary>
    public static class CircleCenterTypeConstant
    {
        /// <summary>
        /// 拐角型
        /// </summary>
        public const string Corner = "corner";
        /// <summary>
        /// 直线型
        /// </summary>
        public const string Line = "linear";
        /// <summary>
        /// 圆弧型
        /// </summary>
        public const string CircularArc = "circularArc";
        /// <summary>
        /// 侧沟型
        /// </summary>
        public const string SideDitch = "lateralSulcusType";



        /// <summary>
        /// 单心圆
        /// </summary>
        public const string SingleHeartRound = "singleHeartRound";
        /// <summary>
        /// 三心圆
        /// </summary>
        public const string ThreeHeartRound = "threeHeartRound";
        /// <summary>
        /// 五心圆
        /// </summary>
        public const string FiveHeartRound = "fiveHeartRound";
        /// <summary>
        /// 七心圆
        /// </summary>
        public const string SevenHeartRound = "sevenHeartRound";

        public static RoundCornerTypeEnum GetRoundCornerType(string str)
        {
            if (str == Corner) return RoundCornerTypeEnum.Corner;
            if (str == Line) return RoundCornerTypeEnum.Linear;
            if (str == CircularArc) return RoundCornerTypeEnum.Round;
            if (str == SideDitch) return RoundCornerTypeEnum.SideDitch;
            return RoundCornerTypeEnum.None;
        }

        public static CircleCenterTypeEnum GetCircleNumber(string str)
        {
            switch (str)
            {
                case SingleHeartRound:
                    return CircleCenterTypeEnum.SingleHeart;
                case ThreeHeartRound:
                    return CircleCenterTypeEnum.ThreeHeart;
                case FiveHeartRound:
                    return CircleCenterTypeEnum.FiveHeart;
                case SevenHeartRound:
                    return CircleCenterTypeEnum.SevenHeart;
                default:

                    return CircleCenterTypeEnum.None;
            }

        }

        /// <summary>
        /// 隧道结构信息
        /// </summary>
        public static class TunnelStructuresInfoConstant
        {

            /// <summary>
            /// 等截面
            /// </summary>
            public const string ConstantSection = "constantSection";
            /// <summary>
            /// 变截面
            /// </summary>
            public const string VariableCrossSection = "variableCrossSection";


            public static LiningCrossSectionTypeEnum GetLiningCrossSectionTypeEnum(string str)
            {
                if (str == ConstantSection) return LiningCrossSectionTypeEnum.ConstantSection;
                if (str == VariableCrossSection) return LiningCrossSectionTypeEnum.VariableCrossSection;
                return LiningCrossSectionTypeEnum.None;
            }
        }

    }
}
